Skip to content

Conversation

@aditi-khare-mongoDB
Copy link

Summary

  • Typescript now throws an error when invalid values are provided to SchemaOptions.encryptionType or SchemaTypeOptions.encrypt

Examples

new Schema(name: { type: String, encrypt: { keyId: 'i am not a UUID' }, encryptionType: 'csfle'); // TS error
new Schema(name: { type: String, encrypt: { keyId: new BSON.UUID }, encryptionType: 'invalidType ); // TS error

@aditi-khare-mongoDB aditi-khare-mongoDB changed the base branch from master to NODE-6506-add-support-for-encrypted-schemas January 29, 2025 22:35
@aditi-khare-mongoDB aditi-khare-mongoDB changed the title Node 6627/ts schema feat(NODE-6627): Add TS support to encrypted schemas Jan 29, 2025
@baileympearson
Copy link

I incorporated these changes into #5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants